Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coupons #506

Open
wants to merge 5 commits into
base: original
Choose a base branch
from
Open

Coupons #506

wants to merge 5 commits into from

Conversation

ticosax
Copy link
Contributor

@ticosax ticosax commented Nov 16, 2017

What's this PR do?

Add support for Coupons and Discounts objects

Definition of Done (check if considered and/or addressed):

  • Are all backwards incompatible changes documented in this PR?
  • Have all new dependencies been documented in this PR?
  • Has the appropriate documentation been updated (if applicable)?
  • Have you written tests to prove this change works (if applicable)?

@ticosax
Copy link
Contributor Author

ticosax commented Nov 16, 2017

@pkolios You might want to add some documentation for this one maybe ?
Feel free to take over my branch.

@ticosax ticosax force-pushed the coupons branch 2 times, most recently from 44a2d34 to 3977ebb Compare November 16, 2017 15:18
@codecov
Copy link

codecov bot commented Nov 16, 2017

Codecov Report

Merging #506 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #506      +/-   ##
=========================================
+ Coverage   99.39%   99.4%   +<.01%     
=========================================
  Files          34      34              
  Lines        1817    1841      +24     
  Branches      166     166              
=========================================
+ Hits         1806    1830      +24     
  Misses          5       5              
  Partials        6       6
Flag Coverage Δ
#py27dj110 99.07% <100%> (+0.01%) ⬆️
#py27dj111 99.07% <100%> (+0.01%) ⬆️
#py27dj18 99.34% <100%> (ø) ⬆️
#py34dj110 99.07% <100%> (+0.01%) ⬆️
#py34dj111 99.07% <100%> (+0.01%) ⬆️
#py34dj18 99.34% <100%> (ø) ⬆️
#py34dj20 99.07% <100%> (+0.01%) ⬆️
#py35dj110 99.07% <100%> (+0.01%) ⬆️
#py35dj111 99.07% <100%> (+0.01%) ⬆️
#py35dj18 99.34% <100%> (ø) ⬆️
#py35dj20 99.07% <100%> (+0.01%) ⬆️
#py36dj111 99.07% <100%> (+0.01%) ⬆️
#py36dj20 99.07% <100%> (+0.01%) ⬆️
#py36dj20psql 99.07% <100%> (+0.01%) ⬆️
Impacted Files Coverage Δ
pinax/stripe/actions/subscriptions.py 100% <100%> (ø) ⬆️
pinax/stripe/webhooks.py 99.08% <100%> (+0.01%) ⬆️
pinax/stripe/actions/coupons.py 100% <100%> (ø) ⬆️
pinax/stripe/models.py 100% <100%> (ø) ⬆️
pinax/stripe/admin.py 100% <0%> (ø) ⬆️
pinax/stripe/actions/charges.py 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5da7818...a6d823c. Read the comment docs.

@blueyed
Copy link
Contributor

blueyed commented Nov 20, 2017

Could include lock8#86 and lock8#85 - will push it here.

@blueyed
Copy link
Contributor

blueyed commented Nov 21, 2017

Could include/use the new base class from #513, too.

@@ -76,6 +77,10 @@ def test_plan_display_invoiceitem(self):
i = InvoiceItem(plan=p)
self.assertEquals(i.plan_display(), "My Plan")

def test_coupon_repr(self):
c = Coupon(id=1, percent_off=25, duration="repeating", duration_in_months=3,)
self.assertEquals(repr(c), "Coupon(pk=1, valid=False, amount_off=None, percent_off=25, currency='usd', duration='repeating', livemode=False, max_redemptions=None, times_redeemed=None, stripe_id='')")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncommon to set id/pk manually, but ok.

@paltman paltman added this to the Rosie milestone Nov 23, 2017
@blueyed
Copy link
Contributor

blueyed commented Nov 27, 2017

This needs to be really synced/updated from our next branch by now.
@pkolios
Do you want to do it?

@blueyed
Copy link
Contributor

blueyed commented Nov 27, 2017

Should wait for #513 to be merged likely.

@paltman paltman modified the milestones: Rosie, December 2017 Sprint Dec 1, 2017
@paltman paltman removed this from the December 2017 Sprint milestone Nov 25, 2021
@paltman paltman changed the base branch from master to 4.x November 26, 2021 16:15
@paltman paltman added the Original The original full pinax-stripe version with cached models and actions service layer label Nov 26, 2021
@paltman paltman changed the base branch from 4.x to original November 26, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Original The original full pinax-stripe version with cached models and actions service layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants